<?php /* Smarty version Smarty-3.1.12, created on 2016-07-11 14:29:37
         compiled from "D:\phpStudy\WWW\demonew\dm\xycms\template.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1428957833cd1c79f32-39471238%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'dfda2aeb27bcaf49a33c25610e3c335700c68603' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\demonew\\dm\\xycms\\template.tpl',
      1 => 1429338526,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1428957833cd1c79f32-39471238',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'page_charset' => 0,
    'copyright_author' => 0,
    'action' => 0,
    'template' => 0,
    'volist' => 0,
    'urlstrs' => 0,
    'content' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_57833cd1d13d18_11480826',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_57833cd1d13d18_11480826')) {function content_57833cd1d13d18_11480826($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\phpStudy\\WWW\\demonew\\source\\core\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->tpl_vars['page_charset']->value;?>
" />
<title>模板管理</title>
<meta name="author" content="<?php echo $_smarty_tpl->tpl_vars['copyright_author']->value;?>
" />
<link type="text/css" rel="stylesheet" href="xycms/css/admin.css" media="screen" />
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<script type="text/javascript" src='../data/editor/kindeditor.js'></script>
</head>
<body>
<?php if ($_smarty_tpl->tpl_vars['action']->value==''){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：模版风格<span>&gt;</span>模板管理</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_template.php" class="btn-general">返回模板根目录</a>模板管理</h3>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
	  <thead class="tb-tit-bg">
	  <tr>
	    <th width="10%"><div class="th-gap">编号</div></th>
		<th width="10%"><div class="th-gap">类型</div></th>
		<th width="30%"><div class="th-gap">文件名</div></th>
		<th width="15%"><div class="th-gap">大小</div></th>
		<th width="18%"><div class="th-gap">最后修改时间</div></th>
		<th><div class="th-gap">操作</div></th>
	  </tr>
	  </thead>
	  <tfoot class="tb-foot-bg"></tfoot>
	  <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['template']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
	  <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['i'];?>
</td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['volist']->value['type']==1){?><font color="green"><b>目录</b></font><?php }else{ ?><font color="blue"><b>文件</b></font><?php }?></td>
		<td align="left"><?php echo $_smarty_tpl->tpl_vars['volist']->value['filename'];?>
</td>
		<td align="center"><?php echo $_smarty_tpl->tpl_vars['volist']->value['size'];?>
</td>
		<td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['volist']->value['timeline'],"%Y-%m-%d %H:%H:%S");?>
</td>
		<td align="center">
		<?php if ($_smarty_tpl->tpl_vars['volist']->value['type']==1){?>
		<a href="xycms_template.php?dir=<?php echo $_smarty_tpl->tpl_vars['volist']->value['filepath'];?>
" class="icon-show">打开目录</a>
		<?php }else{ ?>
		<a href="xycms_template.php?action=edit&file=<?php echo $_smarty_tpl->tpl_vars['volist']->value['filepath'];?>
" class="icon-edit">修改</a>&nbsp;&nbsp;<a href="xycms_template.php?action=del&file=<?php echo $_smarty_tpl->tpl_vars['volist']->value['filepath'];?>
" onClick="{if(confirm('确定要删除该文件吗？一旦删除无法恢复！')){return true;} return false;}" class="icon-del">删除</a>
		<?php }?>
		</td>
	  </tr>
	  <?php }
if (!$_smarty_tpl->tpl_vars['volist']->_loop) {
?>
      <tr>
	    <td colspan="6" align="center">对不起，该目录没有文件！</td>
	  </tr>
	  <?php } ?>
	</table>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：模版风格<span>&gt;</span>编辑模板文件</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_template.php" class="btn-general">返回模板根目录</a>编辑模板文件</h3>
    <form name="myform" id="myform" method="post" action="xycms_template.php" onsubmit='return checkform();'>
    <input type="hidden" name="action" value="saveedit" />
	<input type="hidden" name="file" value="<?php echo $_smarty_tpl->tpl_vars['urlstrs']->value;?>
" />
	<table cellpadding='3' cellspacing='3' class='tab'>
	  <tr>
		<td class='hback_1' width="10%">文件名 </td>
		<td class='hback' width="80%"><b><font color="blue">../<?php echo $_smarty_tpl->tpl_vars['urlstrs']->value;?>
</font></b></td>
	  </tr>
	  <tr>
		<td class='hback_1'>文件内容 <span class='f_red'>*</span></td>
		<td class='hback'><textarea name="content" id="content" style="width:98%;height:300px;display:;overflow:auto;"><?php echo $_smarty_tpl->tpl_vars['content']->value;?>
</textarea>  <br /><span id='dcontent' class='f_red'></span></td>
	  </tr>
	  <tr>
		<td class='hback_none'></td>
		<td class='hback_none'><input type="submit" name="btn_save" class="button" value="编辑保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<script type="text/javascript">
function checkform() {
	var t = "";
	var v = "";

	t = "content";
	v = $("#"+t).val();
	if(v=="") {
		dmsg("模板文件内容不能为空", t);
		return false;
	}
	return true;
}
</script>

</body>
</html>
<?php }} ?>